home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr47
/
wasm223.zip
/
ED.DOC
< prev
next >
Wrap
Text File
|
1993-05-04
|
17KB
|
408 lines
Mr Ed
A Text Editor
by
Eric Tauck
1304 Deerpass Road
Marengo, IL 60152-9644
U.S.A.
Compuserve: 72457,1557
Internet: 72457.1557@compuserve.com
Mr Ed is a simple DOS based text editor for IBM PC/XT/AT compati-
bles. Mr Ed requires PC/MS DOS 3.0 or higher and at least 224K
of free memory.
Mr Ed may be used and distributed freely. The most recent ver-
sion of Mr Ed is available on 5.25" or 3.5" disk by sending $10
to the address above. The Borland C++ source code is available
for $50. The source code is for personal use and may not be
distributed.
Mr Ed can only edit files that fit entirely in memory, have
18,000 lines or less, and no lines longer than 4096 characters.
Mr Ed has a fixed memory overhead of about 230,000 bytes -- all
additional free (conventional) memory is used for editing. Mr Ed
is run by entering:
ED [switches] [file]
'switches' are optional command line arguments that change the
appearance or operation of Mr Ed. 'file' is the name of the file
to edit. If a file is not specified, Mr Ed will start editing an
empty unnamed file. Large files are loaded in the background, so
you may begin editing a large file while the rest of it is being
loaded.
Display
-------
The Mr Ed display consists of a status line at the top of the
screen with the rest of the screen devoted to the text being
edited. The status line shows the file name and a file changed
marker, several state indicators, the memory free, and the cur-
rent row and column position. The file changed marker (the
leftmost character on the status line) is a triangle if the file
doesn't exist (i.e. a new file), a block if an existing file has
been loaded, or an asterisk if the file (new or existing) has
been changed. The state indicators show the state of the numlock
(a '#' if locked), capslock (an up-arrow if locked), the block
status ('Mrk' if marking a block or 'Blk' if a block is marked),
and the insert state ('Ins' if in insert mode). The memory free
is thousands of bytes if a 'K' follows the number, or a simple
byte count if a 'b' follows the number. The first number of the
current location is the row and the second number is the column.
Entering Text
-------------
Simply type in the characters you wish to add to the file. Text
is changed or entered at the cursor location. If insert mode is
on (an 'Ins' is displayed on the status line), existing text will
not be overwritten by new text. The CTRL-P command allows you to
enter keystrokes that would normally be interpreted as commands
(like ^D or TAB). The following is a list of text entry com-
mands:
ENTER start a new line (splits current line)
CTRL-ENTER insert a new line after the current line
INS toggle the insert state
CTRL-P enter a literal character
Deleting Text
-------------
There are several commands for deleting text. You may also
delete sections of text using the block commands described later.
The following is a list of delete commands:
DEL delete the character under the cursor
BKSP delete the character to left of the cursor
CTRL-BKSP delete the word to left of the cursor
CTRL-B delete to the beginning of the line
CTRL-E delete to the end of the line
CTRL-N delete the next word
CTRL-L delete the entire line
Cursor Movement
---------------
Most operations are performed at the cursor location. The cursor
starts at the beginning of the file and moves as different opera-
tions are carried out. The cursor can also be moved using any of
the commands below:
UP move the cursor up one line
DOWN move the cursor down one line
LEFT move the cursor left one column
RIGHT move the cursor right one column
PGUP move the cursor up one screen
PGDN move the cursor down one screen
HOME move the cursor to the first column
END move the cursor to the end of the line
CTRL-LEFT move the cursor to the previous word
CTRL-RIGHT move the cursor to the next word
CTRL-PGUP scroll the file one line up
CTRL-PGDN scroll the file one line down
CTRL-HOME move the cursor to the beginning of the file
CTRL-END move the cursor to the end of the file
TAB move the cursor to the next tab stop
SHIFT-TAB move the cursor to the previous tab stop
ALT-G move the cursor to a specific line number
Search and Replace
------------------
Arbitrary sequences of characters are called strings. Strings
can be searched for and replaced with other strings. String
searching in Mr Ed is "case-sensitive," meaning that upper and
lower case characters must match exactly. The following is a
list of search and replace commands:
F2 find a string
F3 find the next occurrence of a string
F4 find and replace a string
Blocks
------
Blocks are marked sections of text that can be manipulated as a
single unit. Blocks come in two types: marked columns within a
single line (a column block), or marked rows (a line block).
Generally, block operations consist of moving the cursor to where
you want the block to start, begin marking the block, move the
cursor to where you want the block to end, stop marking the
block, and perform a block delete or write operation; OR move the
cursor again and perform a move or copy operation. The following
is a list of block commands:
F5 start/stop/clear marking (line block)
CTRL-F5 start/stop/clear marking (column block)
CTRL-C copy a block to the cursor location
CTRL-D delete a block
CTRL-R read a block (i.e. file) to the cursor location
CTRL-V move a block to the cursor location
CTRL-W write a block to a file
Clipboard
---------
The clipboard is a hidden area for storing text and is useful as
an alternative method of manipulating blocks. For instance,
instead of marking and moving a block, you can cut a block to the
clipboard and paste it in at the new location. A clipboard
'copy' operation copies the current block to the clipboard, a
'cut' operation copies the current block to the clipboard and
then deletes the block, and a 'paste' operation inserts the
contents of the clipboard to the cursor location. The clipboard
is a fixed size of about 1/10th of the total free memory. The
following is a list of clipboard commands:
F6 copy a block to the clipboard
F7 cut a block to the clipboard
F8 paste the clipboard contents
General
-------
The following is a list of general/miscellaneous commands:
F1 display a brief help screen
ALT-A display a chart of ASCII codes
ALT-H display a brief help screen (same as F1)
ALT-L load a new file
ALT-N start editing a new (unnamed) file
ALT-R rename the current file
ALT-S save the current file
ESC clear block (if block marked)
ESC quit Mr Ed (if no block marked)
ALT-X quit Mr Ed
Configuration
-------------
You can save the current configuration or dynamically change and
save the current colors from inside Mr Ed. The following is a
list of commands for saving the configuration and changing the
colors:
ALT-F1 save the current configuration (except colors)
ALT-F2 configure and save the colors
Switches
--------
There are several command line switches that allow you to config-
ure Mr Ed to your personal tastes. These switches may be speci-
fied when Mr Ed is run, listed once and saved with the /SAVE
switch, or specified with the environment variable MRED. When
switch settings are saved with the /SAVE switch (or the ALT-F1
command from within Mr Ed), the settings are saved permanently to
the ED.EXE file. To use the environment variable MRED, just list
the switches as you would on the command line, for instance:
MRED=/AUTO+ /BAK-
Environment variables are usually set in the AUTOEXEC.BAT file.
For conflicting switch settings (for instance you specify /BEEP+
in the environment variable but /BEEP- on the command line),
environment settings take precedence over saved switch settings,
and command line switches take precedence over environment set-
tings. For switches with a '+' and '-' form, the '+' form ena-
bles the feature and the '-' form disables the feature. The
following is a list of command line switches:
/AUTO+
/AUTO-
Automatically save the file when you exit via ALT-X. Mr Ed
usually asks if you want to save any changes to your file when
you exit. If /AUTO+ is used, Mr Ed will automatically save any
changes when you exit. The default is /AUTO-.
/BAK+
/BAK-
Create backup (.BAK) files. If backup files are enabled, Mr Ed
will save an original (i.e. unmodified) copy of the file you're
editing with a .BAK extension. This option is a safety feature
that allows you to get your original file back. The default is
/BAK+.
/BEEP+
/BEEP-
Beep on error. These options enable an audible beep for cer-
tain Mr Ed warnings and errors. The default is /BEEP+.
/BW
/MONO
Force monochrome color set. These two switches force Mr Ed to
use only normal (white on black) or reverse (black on white)
color schemes, regardless of what custom colors have been set.
These switches are particularly useful if you have saved a
color scheme to ED.EXE that is illegible on a particular com-
puter/video system.
/COLOR1=n
Set the status line color. 'n' is a color value in the range 0
to 255. The foreground color values are 0 = black, 1 = blue, 2
= green, 3 = cyan, 4 = red, 5 = magenta, 6 = brown, and 7 =
white. The background color values are 0 = black, 16 = blue,
32 = green, 48 = cyan, 64 = red, 80 = magenta, 96 = brown, and
112 = white. Add a foreground and background color together to
get a combined color value. Add 8 to the total to make the
foreground brighter, and/or add 128 to make the foreground
color blink. The Mr Ed colors can be set with command line
switches or with the ALT-F2 command from within Mr Ed.
/COLOR2=n
Set the normal text color. See the description of the
/COLOR1=n switch.
/COLOR3=n
Set the block marking text color. See the description of the
/COLOR1=n switch.
/COLOR4=n
Set the block marked text color. See the description of the
/COLOR1=n switch.
/COLOR5=n
Set the help screen color. See the description of the
/COLOR1=n switch.
/COLOR6=n
Set the end of file marker color. See the description of the
/COLOR1=n switch.
/DELAY=n
Set the keyboard repeat delay rate. This switch changes the
time that a key must held down before keystrokes start repeat-
ing. This switch only works on extended AT style keyboards.
'n' is the number of 1/100th seconds before keys start repeat-
ing (use 0 for no change). The default is /DELAY=0.
/END+
/END-
Display the end of file marker. These switches enable or
disable a visible end of file marker when editing a file. The
marker shows up as a line of characters across the screen. You
can set the character used in the marker with the /END=n
switch. The default is /END-.
/END=n
Set the end of file marker character. This switch lets you set
the character used to display the end of the file marker. 'n'
is the ASCII value of the character to use. The default is
/END=250. The end of file marker is only displayed if the end
of file marker is enabled (see the /END+,/END- switch descrip-
tion).
/EOF+
/EOF-
Write EOF character to the end of files. When this feature is
enabled, Mr Ed appends an EOF character (ASCII code 26) to the
end of a file when it is saved. The default is /EOF+.
/INSERT+
/INSERT-
Set the insert mode. These switches set the initial insert
state. The default is /INSERT+.
/LINES+
/LINES-
Remove trailing blank lines. When this feature is enabled, Mr
Ed removes blank lines at the end of a file when it is saved.
The default is /LINES-.
/LOCK+
/LOCK-
Lock options. When this feature is enabled, Mr Ed does not
allow any configuration items to be saved to ED.EXE, either by
the /SAVE switch, or by the ALT-F1 or ALT-F2 commands. The
default is /LOCK-.
/RATE=n
Set the keyboard repeat rate. This switch sets the rate at
which keystrokes are repeated when a key is held down. This
switch only works on extended AT style keyboards. 'n' is the
number of keys per second (use 0 for no change). The default
is /RATE=0.
/SAVE
Save switch settings to ED.EXE. This switch permanently saves
all other switch settings, so the switches need not be speci-
fied the next time Mr Ed is run.
/SPACES+
/SPACES-
Remove trailing spaces. When this feature is enabled, Mr Ed
removes spaces at the end of lines when a file is saved. The
default is /SPACES-.
DISCLAIMER OF WARRANTY
----------------------
THIS SOFTWARE AND MANUAL ARE DISTRIBUTED "AS IS" AND WITHOUT
WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER
WARRANTIES WHETHER EXPRESSED OR IMPLIED. BECAUSE OF THE VARIOUS
HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE
PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE
THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.
THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY
LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT
REPLACEMENT OR REFUND OF PURCHASE PRICE.